home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / tpapi.exe / EXAMPLES / DELOBJ.PAS < prev    next >
Pascal/Delphi Source File  |  1994-01-14  |  3KB  |  91 lines

  1. {***************************************************************************}
  2. {** Program : DELOBJ                                                      **}
  3. {***************************************************************************}
  4. {** Version : 1.0             ** Started :           ** Ended :           **}
  5. {***************************************************************************}
  6. {******************************** Description ******************************}
  7. {***************************************************************************}
  8. {** Program to delete a specified object from the bindery.                **}
  9. {**                                                                       **}
  10. {**                                                                       **}
  11. {**                                                                       **}
  12. {**                                                                       **}
  13. {**                                                                       **}
  14. {**                                                                       **}
  15. {**                                                                       **}
  16. {***************************************************************************}
  17. {******************************** Information ******************************}
  18. {***************************************************************************}
  19. {**                                                                       **}
  20. {**                                                                       **}
  21. {**                                                                       **}
  22. {**                                                                       **}
  23. {**                                                                       **}
  24. {**                                                                       **}
  25. {***************************************************************************}
  26.  
  27. program DELOBJ;
  28.  
  29. uses
  30.  
  31.   nwvar,
  32.   nwerror,
  33.   nwbindry;
  34.  
  35. var
  36.  
  37.   BinderyFunc : BinderyOBJ;
  38.  
  39.  
  40. procedure Initialise;
  41.  
  42. begin
  43.  
  44.   if paramcount < 2 then
  45.     begin
  46.  
  47.       writeln;
  48.       writeln ('USAGE : [objectname] [objecttype]');
  49.       writeln;
  50.       halt
  51.  
  52.     end;
  53.  
  54.   BinderyFunc.Init (true);
  55.  
  56. end; {Initialise}
  57.  
  58. {***}
  59.  
  60. procedure Done;
  61.  
  62. begin
  63.  
  64.   BinderyFunc.Done;
  65.  
  66. end; {Done}
  67.  
  68. {***}
  69.  
  70. procedure KillObject;
  71.  
  72. begin
  73.  
  74.   writeln ('Deleting bindery object : ', BinderyFunc.UppercaseNW (paramstr (1)));
  75.   write ('Status code : ');
  76.   with BinderyFunc do
  77.     writeln (GetBinderyServicesError (DeleteBinderyObject (paramstr (1), StrToInt (Paramstr (2)))));
  78.  
  79. end; {KillObject}
  80.  
  81. {***}
  82.  
  83. begin
  84.  
  85.   Initialise;
  86.   KillObject;
  87.   Done;
  88.  
  89. end.
  90.  
  91.